using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._EditingTools._Conflation
{
    /// <summary>
    /// <para>Generate Edgematch Links</para>
    /// <para>Finds matching but disconnected line features along the edges of the source data's area and its adjacent data's area, and generates edgematch links from the source lines to the matched adjacent lines.</para>
    /// <para>沿源数据区域及其相邻数据区域的边缘查找匹配但断开连接的线要素，并生成从源线到匹配相邻线的边匹配链接。</para>
    /// </summary>    
    [DisplayName("Generate Edgematch Links")]
    public class GenerateEdgematchLinks : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public GenerateEdgematchLinks()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_source_features">
        /// <para>Source Features</para>
        /// <para>Line features as edgematching source features. All edgematch links start at source features.</para>
        /// <para>线要素作为边匹配源要素。所有边缘匹配链路都从源要素开始。</para>
        /// </param>
        /// <param name="_adjacent_features">
        /// <para>Adjacent Features</para>
        /// <para>Line features adjacent to source features. All edgematch links end at matched adjacent features.</para>
        /// <para>与源要素相邻的线要素。所有边匹配链路都以匹配的相邻要素结束。</para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>Output feature class containing lines representing edgematch links.</para>
        /// <para>输出要素类，包含表示边匹配链接的线。</para>
        /// </param>
        /// <param name="_search_distance">
        /// <para>Search Distance</para>
        /// <para>The distance used to search for match candidates. A distance must be specified and it must be greater than zero. You can choose a preferred unit; the default is the feature unit.</para>
        /// <para>用于搜索匹配候选项的距离。必须指定距离，并且该距离必须大于零。您可以选择首选单位;默认值为要素单位。</para>
        /// </param>
        public GenerateEdgematchLinks(object _source_features, object _adjacent_features, object _out_feature_class, string? _search_distance)
        {
            this._source_features = _source_features;
            this._adjacent_features = _adjacent_features;
            this._out_feature_class = _out_feature_class;
            this._search_distance = _search_distance;
        }
        public override string ToolboxName => "Editing Tools";

        public override string ToolName => "Generate Edgematch Links";

        public override string CallName => "edit.GenerateEdgematchLinks";

        public override List<string> AcceptEnvironments => ["extent", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_source_features, _adjacent_features, _out_feature_class, _search_distance, _match_fields];

        /// <summary>
        /// <para>Source Features</para>
        /// <para>Line features as edgematching source features. All edgematch links start at source features.</para>
        /// <para>线要素作为边匹配源要素。所有边缘匹配链路都从源要素开始。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Source Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _source_features { get; set; }


        /// <summary>
        /// <para>Adjacent Features</para>
        /// <para>Line features adjacent to source features. All edgematch links end at matched adjacent features.</para>
        /// <para>与源要素相邻的线要素。所有边匹配链路都以匹配的相邻要素结束。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Adjacent Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _adjacent_features { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>Output feature class containing lines representing edgematch links.</para>
        /// <para>输出要素类，包含表示边匹配链接的线。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Search Distance</para>
        /// <para>The distance used to search for match candidates. A distance must be specified and it must be greater than zero. You can choose a preferred unit; the default is the feature unit.</para>
        /// <para>用于搜索匹配候选项的距离。必须指定距离，并且该距离必须大于零。您可以选择首选单位;默认值为要素单位。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Search Distance")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public string? _search_distance { get; set; }


        /// <summary>
        /// <para>Match Fields</para>
        /// <para>Fields from source and target features, where target fields are from the adjacent features. If specified, each pair of fields are checked for match candidates to help determine the right match.</para>
        /// <para>源要素和目标要素中的字段，其中目标字段来自相邻要素。如果指定，则会检查每对字段的匹配候选项，以帮助确定正确的匹配项。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Match Fields")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _match_fields { get; set; } = null;


        public GenerateEdgematchLinks SetEnv(object extent = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(extent: extent, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}